const areaList = {
  province_list: {
    110000: '北京市',
    120000: '天津市',
  },
  city_list: {
    110100: '北京市',
    120100: '天津市',
  },
  county_list: {
    110101: '东城区',
    110102: '西城区',
    // ....
  },
};
Page({
  data: {
    selectedOption: '选择地区',
    show: false,
    show1: false,
    areaList,
    selectedOption1: '全部'
  },

  showPopup() {
    this.setData({ show: true });
  },
  showPopup1() {
    this.setData({ show1: true });
  },
  onClose() {
    this.setData({ show: false });
  },
  onClose1() {
    this.setData({ show1: false });
  },
  formatDate(date) {
    date = new Date(date);
    return `${date.getMonth() + 1}/${date.getDate()}`;
  },
  onConfirm(event) {
    this.setData({
      show: false,
      show1: false,
      date: this.formatDate(event.detail),
    });
  },

  onDisplay() {
    this.setData({ show: true });
  },

  onOptionChange(event) {
    this.setData({ 
      selectedOption: event.detail
    });
    this.setData({ 
      show: false
    });
  },
  onOptionClick: function(event) {
    var option = event.currentTarget.dataset.option;
    this.setData({
      selectedOption1: option
    });
	},
	onBack(){
		wx.navigateBack();
	}
});